function createUrl(url) {
    var path = "";
    if (url.indexOf("http:") != 0) {
        var scope = $('body').scope();
        var protocol = scope.location.protocol();
        var host = scope.location.host();
        var port = scope.location.port();
        port = port ? ":" + port : "";
        var contextPath = $("#contextPath").val();

        if (url.indexOf("/") != 0) {
            url = "/" + url;
        }

        path = protocol + "://" + host + port + contextPath + url;
        return path;
    } else {
        path = url;
    }
    return path;
}

function isNull(v) {
    return v === undefined || v == null|| v === "";
}